#ifndef _MAPPER0_H
#define _MAPPER0_H

#include "mapper.h"

class CMapper0 : public CMapper
{
public:
  CMapper0(CCpu* cpu) : CMapper(cpu)
  {
    Init();
  }

  virtual void Init()
  {
    if (m_Cpu->m_ROMBankCount > 1) {
      m_Cpu->PrgRom[0] = ROM_BANK(0);
      m_Cpu->PrgRom[1] = ROM_BANK(1);
      m_Cpu->PrgRom[2] = ROM_BANK(2);
      m_Cpu->PrgRom[3] = ROM_BANK(3);
    } else if (m_Cpu->m_ROMBankCount == 1) {
      m_Cpu->PrgRom[0] = ROM_BANK(0);
      m_Cpu->PrgRom[1] = ROM_BANK(1);
      m_Cpu->PrgRom[2] = ROM_BANK(0);
      m_Cpu->PrgRom[3] = ROM_BANK(1);
    } else {
      m_Cpu->PrgRom[0] = ROM_BANK(0);
      m_Cpu->PrgRom[1] = ROM_BANK(0);
      m_Cpu->PrgRom[2] = ROM_BANK(0);
      m_Cpu->PrgRom[3] = ROM_BANK(0);
    }
  }
  virtual void Write(u16 addr, u8 data)
  {
  }
};

#endif  // _MAPPER0_H
